package com.miluGame.service.impl;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.miluGame.entity.Menu;
import com.miluGame.entity.User;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.miluGame.mapper.MenuMapper;
import com.miluGame.service.MenuService;

@Service
public class MenuServiceImpl implements MenuService{
	
	@Autowired
	private MenuMapper menuMapper;
	
	@Override
	public List<Menu> queryAll(Menu t) {
		return menuMapper.queryAll(null);
	}

	@Override
	public void delete(String id) throws Exception {
		
		
	}

	@Override
	public void update(Menu t) throws Exception {
		
		
	}

	@Override
	public Menu getById(String id) {
		
		return null;
	}

	@Override
	public void add(Menu t) throws Exception {
		
	}

	@Override
	public void delete(String[] ids) throws Exception {
		
	}


	@Override
	public List<Menu> getUserMenues(HttpSession session,HttpServletRequest rsq, HttpServletResponse rsp) {
		User user = (User)session.getAttribute("user");
		//String userMenus = user.getFunctionalgroup();
		//List<Menu> menues = menuMapper.queryMenues("("+user.getFunctionalgroup()+")");
		
		return null;
	}

}
